package com.erp.employee.dao.idl;

import java.util.Map;

import com.erp.employee.dao.idl.EmployeeDdos.EmployeeDdo;
import com.erp.employee.dao.idl.EmployeeDdos.EmployeeFilterDdo;
import com.paipai.lang.uint32_t;
import com.paipai.util.annotation.ApiProtocol;
import com.paipai.util.annotation.Field;
import com.paipai.util.annotation.HeadApiProtocol;

@HeadApiProtocol(cPlusNamespace = "erp::employee::dao", needInit = true,needReset=true,serviceType="dao",platformType="erp")
public class EmployeeDao {
	@ApiProtocol(cmdid = "0xC00B1801L", desc = " 根据ID获取员工信息 ")
	class GetEmployeeById
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "过滤器，必填 ")
			EmployeeFilterDdo employeeFilter;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "员工信息 ")
			Map<uint32_t,EmployeeDdo> employees;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
	
	
	@ApiProtocol(cmdid = "0xC00B1802L", desc = " 写入员工信息 ")
	class AddEmployee
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "员工信息列表，必填 ")
			EmployeeDdo employee;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "员工信息列表，必填 ")
			EmployeeDdo employeeBack;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
	
	@ApiProtocol(cmdid = "0xC00B1803L", desc = " 修改员工信息 ")
	class UpdateEmployee
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "员工信息列表，必填 ")
			EmployeeDdo employee;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "员工信息列表，必填 ")
			EmployeeDdo employeeBack;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
	
	@ApiProtocol(cmdid = "0xC00B1804L", desc = " 删除员工信息 ")
	class DeleteEmployee
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "员工信息列表，必填 ")
			EmployeeDdo employee;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
}
